<?php
if($_SERVER['REQUEST_METHOD'] == 'OPTIONS'){
    header("Access-Control-Allow-Origin: *");
    header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Authorization");
    header('Access-Control-Allow-Methods: GET, POST, PUT,DELETE,OPTIONS,PATCH');
    exit;
}
// 定义项目名称
define('APP_NAME', 'api');

// 定义项目路径
define('APP_PATH', './wx_api/');

// Define ABSPATH as this files directory
define( 'ABSPATH', dirname(__FILE__) . '/' );
// 加载常量定义
require APP_PATH . 'ConstDef.php';

// 加载全局函数
require APP_PATH . 'Event.php';
require APP_PATH . 'UniUser.php';
require APP_PATH . 'Comment.php';
require APP_PATH . 'GiveRewards.php';
require APP_PATH . 'AccessTag.php';
require APP_PATH . 'Express.php';
//加载框架入口文件
require './wx_include/ThinkPHP/ThinkPHP.php';

//设置PHP的SESSION由用户定义
ini_set('session.save_handler', 'user');
?>
